<!DOCTYPE html>
<html lang="en">
  <head>
    <title>CollectionViewChatLayout Class Reference</title>
    <link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
    <link rel="stylesheet" type="text/css" href="../css/highlight.css" />
    <meta charset="utf-8">
    <script src="../js/jquery.min.js" defer></script>
    <script src="../js/jazzy.js" defer></script>
    
    <script src="../js/lunr.min.js" defer></script>
    <script src="../js/typeahead.jquery.js" defer></script>
    <script src="../js/jazzy.search.js" defer></script>
  </head>
  <body>

    <a name="//apple_ref/swift/Class/CollectionViewChatLayout" class="dashAnchor"></a>

    <a title="CollectionViewChatLayout Class Reference"></a>

    <header class="header">
      <p class="header-col header-col--primary">
        <a class="header-link" href="../index.html">
          ChatLayout 2.2.2 Docs
        </a>
         (100% documented)
      </p>
    
      <div class="header-col--secondary">
        <form role="search" action="../search.json">
          <input type="text" placeholder="Search documentation" data-typeahead>
        </form>
      </div>
    
    
    </header>

    <p class="breadcrumbs">
      <a class="breadcrumb" href="../index.html">ChatLayout</a>
      <img class="carat" src="../img/carat.png" alt=""/>
      <a class="breadcrumb" href="../Core.html">Core</a>
      <img class="carat" src="../img/carat.png" alt=""/>
      CollectionViewChatLayout Class Reference
    </p>

    <div class="content-wrapper">
      <nav class="navigation">
        <ul class="nav-groups">
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="../Core.html">Core</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/CollectionViewChatLayout.html">CollectionViewChatLayout</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Protocols/ChatLayoutDelegate.html">ChatLayoutDelegate</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/ChatLayoutAttributes.html">ChatLayoutAttributes</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/ChatLayoutSettings.html">ChatLayoutSettings</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/ChatLayoutSettings/PinneableItems.html">– PinneableItems</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/ChatLayoutPositionSnapshot.html">ChatLayoutPositionSnapshot</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/ChatLayoutPositionSnapshot/Edge.html">– Edge</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/ChatLayoutInvalidationContext.html">ChatLayoutInvalidationContext</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/ItemKind.html">ItemKind</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/ItemSize.html">ItemSize</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/ItemSize/CaseType.html">– CaseType</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/ChatItemAlignment.html">ChatItemAlignment</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/ChatItemPinningType.html">ChatItemPinningType</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/InitialAttributesRequestType.html">InitialAttributesRequestType</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="../Extras.html">Extras</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/ContainerCollectionViewCell.html">ContainerCollectionViewCell</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Protocols/ContainerCollectionViewCellDelegate.html">ContainerCollectionViewCellDelegate</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/ContainerCollectionReusableView.html">ContainerCollectionReusableView</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/MessageContainerView.html">MessageContainerView</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/CellLayoutContainerView.html">CellLayoutContainerView</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/CellLayoutContainerViewAlignment.html">CellLayoutContainerViewAlignment</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/EdgeAligningView.html">EdgeAligningView</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/EdgeAligningView/Edge.html">– Edge</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/SwappingContainerView.html">SwappingContainerView</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/SwappingContainerView/Axis.html">– Axis</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/SwappingContainerView/Distribution.html">– Distribution</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/ImageMaskedView.html">ImageMaskedView</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/ImageMaskedViewTransformation.html">ImageMaskedViewTransformation</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/RoundedCornersContainerView.html">RoundedCornersContainerView</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Protocols/StaticViewFactory.html">StaticViewFactory</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/VoidViewFactory.html">VoidViewFactory</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/VoidViewFactory.html#/s:10ChatLayout15VoidViewFactoryV0cD0C">– VoidView</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="../Other%20Guides.html">Other Guides</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../readme.html">README</a>
              </li>
            </ul>
          </li>
        </ul>
      </nav>
      <article class="main-content">

        <section class="section">
          <div class="section-content top-matter">
            <h1>CollectionViewChatLayout</h1>
              <div class="declaration">
                <div class="language">
                  
                  <pre class="highlight swift"><code><span class="kd">@MainActor</span>
<span class="kd">open</span> <span class="kd">class</span> <span class="kt">CollectionViewChatLayout</span> <span class="p">:</span> <span class="kt">UICollectionViewLayout</span></code></pre>

                </div>
              </div>
            <p>A custom collection view layout designed to present items in a grid-like format, similar to UITableView, while aligning content to
either the leading or trailing edge of the UICollectionView. This layout supports chat-style interfaces by preserving a consistent
content offset from the bottom. It also accommodates self-sizing cells and supplementary views, ensuring dynamic and responsive
content presentation.</p>
<h3 id='custom-properties' class='heading'>Custom Properties:</h3>

<p><code><a href="../Classes/CollectionViewChatLayout.html#/s:10ChatLayout014CollectionViewaB0C8delegateAA0aB8Delegate_pSgvp">CollectionViewChatLayout.delegate</a></code></p>

<p><code><a href="../Classes/CollectionViewChatLayout.html#/s:10ChatLayout014CollectionViewaB0C8settingsAA0aB8SettingsVvp">CollectionViewChatLayout.settings</a></code></p>

<p><code><a href="../Classes/CollectionViewChatLayout.html#/s:10ChatLayout014CollectionViewaB0C39keepContentOffsetAtBottomOnBatchUpdatesSbvp">CollectionViewChatLayout.keepContentOffsetAtBottomOnBatchUpdates</a></code></p>

<p><code><a href="../Classes/CollectionViewChatLayout.html#/s:10ChatLayout014CollectionViewaB0C45processOnlyVisibleItemsOnAnimatedBatchUpdatesSbvp">CollectionViewChatLayout.processOnlyVisibleItemsOnAnimatedBatchUpdates</a></code></p>

<p><code><a href="../Classes/CollectionViewChatLayout.html#/s:10ChatLayout014CollectionViewaB0C32keepContentAtBottomOfVisibleAreaSbvp">CollectionViewChatLayout.keepContentAtBottomOfVisibleArea</a></code></p>

<p><code><a href="../Classes/CollectionViewChatLayout.html#/s:10ChatLayout014CollectionViewaB0C13visibleBoundsSo6CGRectVvp">CollectionViewChatLayout.visibleBounds</a></code></p>

<p><code><a href="../Classes/CollectionViewChatLayout.html#/s:10ChatLayout014CollectionViewaB0C11layoutFrameSo6CGRectVvp">CollectionViewChatLayout.layoutFrame</a></code></p>
<h3 id='custom-methods' class='heading'>Custom Methods:</h3>

<p><code><a href="../Classes/CollectionViewChatLayout.html#/s:10ChatLayout014CollectionViewaB0C24getContentOffsetSnapshot4fromAA0ab8PositionH0VSgAG4EdgeO_tF">CollectionViewChatLayout.getContentOffsetSnapshot(...)</a></code></p>

<p><code><a href="../Classes/CollectionViewChatLayout.html#/s:10ChatLayout014CollectionViewaB0C20restoreContentOffset4withyAA0aB16PositionSnapshotV_tF">CollectionViewChatLayout.restoreContentOffset(...)</a></code></p>

<p><code><a href="../Classes/CollectionViewChatLayout.html#/s:10ChatLayout014CollectionViewaB0C16reconfigureItems2atySay10Foundation9IndexPathVG_tF">CollectionViewChatLayout.reconfigureItems(...)</a></code></p>

<p><code><a href="../Classes/CollectionViewChatLayout.html#/s:10ChatLayout014CollectionViewaB0C23indexPathForItePinnedAty10Foundation05IndexF0VSgAA0A15ItemPinningTypeOF">CollectionViewChatLayout.indexPathForItePinnedAt(...)</a></code></p>

          </div>
        </section>

        <section class="section">
          <div class="section-content">
            <div class="task-group">
              <div class="task-name-container">
                <a name="/Custom%20Properties"></a>
                <a name="//apple_ref/swift/Section/Custom Properties" class="dashAnchor"></a>
                <div class="section-name-container">
                  <a class="section-name-link" href="#/Custom%20Properties"></a>
                  <h3 class="section-name"><span>Custom Properties</span>
</h3>
                </div>
              </div>
              <ul class="item-container">
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:10ChatLayout014CollectionViewaB0C8delegateAA0aB8Delegate_pSgvp"></a>
                    <a name="//apple_ref/swift/Property/delegate" class="dashAnchor"></a>
                    <a class="token" href="#/s:10ChatLayout014CollectionViewaB0C8delegateAA0aB8Delegate_pSgvp">delegate</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p><code>CollectionViewChatLayout</code> delegate.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">@MainActor</span>
<span class="kd">open</span> <span class="k">weak</span> <span class="k">var</span> <span class="nv">delegate</span><span class="p">:</span> <span class="kt"><a href="../Protocols/ChatLayoutDelegate.html">ChatLayoutDelegate</a></span><span class="p">?</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:10ChatLayout014CollectionViewaB0C8settingsAA0aB8SettingsVvp"></a>
                    <a name="//apple_ref/swift/Property/settings" class="dashAnchor"></a>
                    <a class="token" href="#/s:10ChatLayout014CollectionViewaB0C8settingsAA0aB8SettingsVvp">settings</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Additional settings for <code>CollectionViewChatLayout</code>.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">@MainActor</span>
<span class="kd">public</span> <span class="k">var</span> <span class="nv">settings</span><span class="p">:</span> <span class="kt"><a href="../Structs/ChatLayoutSettings.html">ChatLayoutSettings</a></span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:10ChatLayout014CollectionViewaB0C39keepContentOffsetAtBottomOnBatchUpdatesSbvp"></a>
                    <a name="//apple_ref/swift/Property/keepContentOffsetAtBottomOnBatchUpdates" class="dashAnchor"></a>
                    <a class="token" href="#/s:10ChatLayout014CollectionViewaB0C39keepContentOffsetAtBottomOnBatchUpdatesSbvp">keepContentOffsetAtBottomOnBatchUpdates</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>By default, <code>UIScrollView</code> maintains a constant content offset relative to the top edge. When this flag is set to true,
<code>CollectionViewChatLayout</code> will attempt to adjust for batch updates in order to keep the currently visible content anchored
to the bottom of the UICollectionView.</p>

<p><strong>NB:</strong>
If the content inset changes during the batch update—for example, due to keyboard frame adjustments - <code>CollectionViewChatLayout</code>
typically receives this information after the animation begins and may not be able to account for it automatically. In such cases, manual
compensation is required.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">@MainActor</span>
<span class="kd">public</span> <span class="k">var</span> <span class="nv">keepContentOffsetAtBottomOnBatchUpdates</span><span class="p">:</span> <span class="kt">Bool</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:10ChatLayout014CollectionViewaB0C32keepContentAtBottomOfVisibleAreaSbvp"></a>
                    <a name="//apple_ref/swift/Property/keepContentAtBottomOfVisibleArea" class="dashAnchor"></a>
                    <a class="token" href="#/s:10ChatLayout014CollectionViewaB0C32keepContentAtBottomOfVisibleAreaSbvp">keepContentAtBottomOfVisibleArea</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>By default, <code>UICollectionView</code> positions its cells at the top of the visible area when the content size is smaller than the viewport.
Enabling this flag reverses that behavior, allowing cells to align with the bottom edge of the <code>UICollectionView</code> - similar to the behavior
seen in applications like Telegram.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">@MainActor</span>
<span class="kd">public</span> <span class="k">var</span> <span class="nv">keepContentAtBottomOfVisibleArea</span><span class="p">:</span> <span class="kt">Bool</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:10ChatLayout014CollectionViewaB0C45processOnlyVisibleItemsOnAnimatedBatchUpdatesSbvp"></a>
                    <a name="//apple_ref/swift/Property/processOnlyVisibleItemsOnAnimatedBatchUpdates" class="dashAnchor"></a>
                    <a class="token" href="#/s:10ChatLayout014CollectionViewaB0C45processOnlyVisibleItemsOnAnimatedBatchUpdatesSbvp">processOnlyVisibleItemsOnAnimatedBatchUpdates</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Sometimes <code>UIScrollView</code> can behave weirdly if there are too many corrections in it&rsquo;s <code>contentOffset</code> during the animation. Especially when content size of the <code>UIScrollView</code>
is getting smaller first and then expands again as the newly appearing cells sizes are being calculated. That is why <code>CollectionViewChatLayout</code>
tries to process only the elements that are currently visible on the screen. But often it is not needed. This flag allows you to have fine control over this behaviour.
It set to <code>true</code> by default to keep the compatibility with the older versions of the library.</p>

<p><strong>NB:</strong>
This flag is only to provide fine control over the batch updates. If in doubts - keep it <code>true</code>.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">@MainActor</span>
<span class="kd">public</span> <span class="k">var</span> <span class="nv">processOnlyVisibleItemsOnAnimatedBatchUpdates</span><span class="p">:</span> <span class="kt">Bool</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:10ChatLayout014CollectionViewaB0C29supportSelfSizingInvalidationSbvp"></a>
                    <a name="//apple_ref/swift/Property/supportSelfSizingInvalidation" class="dashAnchor"></a>
                    <a class="token" href="#/s:10ChatLayout014CollectionViewaB0C29supportSelfSizingInvalidationSbvp">supportSelfSizingInvalidation</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Enables a mode for automatic self-sizing invalidation in response to Auto Layout changes. While this can be useful in certain scenarios,
it is generally recommended to continue using explicit reload/reconfigure methods - particularly when multiple changes occur
simultaneously with animation. This ensures that <code>CollectionViewChatLayout</code> can manage layout updates while preserving content
offset consistency.</p>

<p><strong>NB:</strong>
This is an experimental feature and should be used only when no more reliable alternatives are available.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">@available</span><span class="p">(</span><span class="n">iOS</span> <span class="mf">16.0</span><span class="p">,</span> <span class="o">*</span><span class="p">)</span>
<span class="kd">@MainActor</span>
<span class="kd">public</span> <span class="k">var</span> <span class="nv">supportSelfSizingInvalidation</span><span class="p">:</span> <span class="kt">Bool</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:10ChatLayout014CollectionViewaB0C13visibleBoundsSo6CGRectVvp"></a>
                    <a name="//apple_ref/swift/Property/visibleBounds" class="dashAnchor"></a>
                    <a class="token" href="#/s:10ChatLayout014CollectionViewaB0C13visibleBoundsSo6CGRectVvp">visibleBounds</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Represent the currently visible rectangle.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">@MainActor</span>
<span class="kd">open</span> <span class="k">var</span> <span class="nv">visibleBounds</span><span class="p">:</span> <span class="kt">CGRect</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:10ChatLayout014CollectionViewaB0C11layoutFrameSo6CGRectVvp"></a>
                    <a name="//apple_ref/swift/Property/layoutFrame" class="dashAnchor"></a>
                    <a class="token" href="#/s:10ChatLayout014CollectionViewaB0C11layoutFrameSo6CGRectVvp">layoutFrame</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Represent the rectangle where all the items are aligned.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">@MainActor</span>
<span class="kd">open</span> <span class="k">var</span> <span class="nv">layoutFrame</span><span class="p">:</span> <span class="kt">CGRect</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
            <div class="task-group">
              <div class="task-name-container">
                <a name="/Inherited%20Properties"></a>
                <a name="//apple_ref/swift/Section/Inherited Properties" class="dashAnchor"></a>
                <div class="section-name-container">
                  <a class="section-name-link" href="#/Inherited%20Properties"></a>
                  <h3 class="section-name"><span>Inherited Properties</span>
</h3>
                </div>
              </div>
              <ul class="item-container">
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:@M@ChatLayout@objc(cs)CollectionViewChatLayout(py)developmentLayoutDirection"></a>
                    <a name="//apple_ref/swift/Property/developmentLayoutDirection" class="dashAnchor"></a>
                    <a class="token" href="#/c:@M@ChatLayout@objc(cs)CollectionViewChatLayout(py)developmentLayoutDirection">developmentLayoutDirection</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>The direction of the language you used when designing <code>CollectionViewChatLayout</code> layout.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">@MainActor</span>
<span class="kd">open</span> <span class="k">override</span> <span class="k">var</span> <span class="nv">developmentLayoutDirection</span><span class="p">:</span> <span class="kt">UIUserInterfaceLayoutDirection</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:@M@ChatLayout@objc(cs)CollectionViewChatLayout(py)flipsHorizontallyInOppositeLayoutDirection"></a>
                    <a name="//apple_ref/swift/Property/flipsHorizontallyInOppositeLayoutDirection" class="dashAnchor"></a>
                    <a class="token" href="#/c:@M@ChatLayout@objc(cs)CollectionViewChatLayout(py)flipsHorizontallyInOppositeLayoutDirection">flipsHorizontallyInOppositeLayoutDirection</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>A Boolean value that indicates whether the horizontal coordinate system is automatically flipped at appropriate times.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">@MainActor</span>
<span class="kd">open</span> <span class="k">override</span> <span class="k">var</span> <span class="nv">flipsHorizontallyInOppositeLayoutDirection</span><span class="p">:</span> <span class="kt">Bool</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:@M@ChatLayout@objc(cs)CollectionViewChatLayout(cpy)layoutAttributesClass"></a>
                    <a name="//apple_ref/swift/Variable/layoutAttributesClass" class="dashAnchor"></a>
                    <a class="token" href="#/c:@M@ChatLayout@objc(cs)CollectionViewChatLayout(cpy)layoutAttributesClass">layoutAttributesClass</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Custom layoutAttributesClass is <code><a href="../Classes/ChatLayoutAttributes.html">ChatLayoutAttributes</a></code>.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">@MainActor</span>
<span class="kd">public</span> <span class="k">override</span> <span class="kd">class</span> <span class="k">var</span> <span class="nv">layoutAttributesClass</span><span class="p">:</span> <span class="kt">AnyClass</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:@M@ChatLayout@objc(cs)CollectionViewChatLayout(cpy)invalidationContextClass"></a>
                    <a name="//apple_ref/swift/Variable/invalidationContextClass" class="dashAnchor"></a>
                    <a class="token" href="#/c:@M@ChatLayout@objc(cs)CollectionViewChatLayout(cpy)invalidationContextClass">invalidationContextClass</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Custom invalidationContextClass is <code><a href="../Classes/ChatLayoutInvalidationContext.html">ChatLayoutInvalidationContext</a></code>.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">@MainActor</span>
<span class="kd">public</span> <span class="k">override</span> <span class="kd">class</span> <span class="k">var</span> <span class="nv">invalidationContextClass</span><span class="p">:</span> <span class="kt">AnyClass</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:@M@ChatLayout@objc(cs)CollectionViewChatLayout(py)collectionViewContentSize"></a>
                    <a name="//apple_ref/swift/Property/collectionViewContentSize" class="dashAnchor"></a>
                    <a class="token" href="#/c:@M@ChatLayout@objc(cs)CollectionViewChatLayout(py)collectionViewContentSize">collectionViewContentSize</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>The width and height of the collection view’s contents.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">@MainActor</span>
<span class="kd">open</span> <span class="k">override</span> <span class="k">var</span> <span class="nv">collectionViewContentSize</span><span class="p">:</span> <span class="kt">CGSize</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:10ChatLayout014CollectionViewaB0C16enableIOS15_1FixSbvp"></a>
                    <a name="//apple_ref/swift/Property/enableIOS15_1Fix" class="dashAnchor"></a>
                    <a class="token" href="#/s:10ChatLayout014CollectionViewaB0C16enableIOS15_1FixSbvp">enableIOS15_1Fix</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>There is an issue in IOS 15.1 that proposed content offset is being ignored by the UICollectionView when user is scrolling.
This flag enables a hack to compensate this offset later. You can disable it if necessary.
Bug reported: <a href="https://feedbackassistant.apple.com/feedback/9727104">https://feedbackassistant.apple.com/feedback/9727104</a></p>

<p>PS: This issue was fixed in 15.2</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">@MainActor</span>
<span class="kd">public</span> <span class="k">var</span> <span class="nv">enableIOS15_1Fix</span><span class="p">:</span> <span class="kt">Bool</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
            <div class="task-group">
              <div class="task-name-container">
                <a name="/Constructors"></a>
                <a name="//apple_ref/swift/Section/Constructors" class="dashAnchor"></a>
                <div class="section-name-container">
                  <a class="section-name-link" href="#/Constructors"></a>
                  <h3 class="section-name"><span>Constructors</span>
</h3>
                </div>
              </div>
              <ul class="item-container">
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:10ChatLayout014CollectionViewaB0C027flipsHorizontallyInOppositeB9DirectionACSb_tcfc"></a>
                    <a name="//apple_ref/swift/Method/init(flipsHorizontallyInOppositeLayoutDirection:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:10ChatLayout014CollectionViewaB0C027flipsHorizontallyInOppositeB9DirectionACSb_tcfc">init(flipsHorizontallyInOppositeLayoutDirection:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Default constructor.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">@MainActor</span>
<span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">flipsHorizontallyInOppositeLayoutDirection</span><span class="p">:</span> <span class="kt">Bool</span> <span class="o">=</span> <span class="kc">true</span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>flipsHorizontallyInOppositeLayoutDirection</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Indicates whether the horizontal coordinate
system is automatically flipped at appropriate times. In practice, this is used to support
right-to-left layout.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:@M@ChatLayout@objc(cs)CollectionViewChatLayout(im)initWithCoder:"></a>
                    <a name="//apple_ref/swift/Method/init(coder:)" class="dashAnchor"></a>
                    <a class="token" href="#/c:@M@ChatLayout@objc(cs)CollectionViewChatLayout(im)initWithCoder:">init(coder:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Returns an object initialized from data in a given unarchiver.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">@MainActor</span>
<span class="kd">public</span> <span class="kd">required</span> <span class="nf">init</span><span class="p">?(</span><span class="n">coder</span> <span class="nv">aDecoder</span><span class="p">:</span> <span class="kt">NSCoder</span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
            <div class="task-group">
              <div class="task-name-container">
                <a name="/Custom%20Methods"></a>
                <a name="//apple_ref/swift/Section/Custom Methods" class="dashAnchor"></a>
                <div class="section-name-container">
                  <a class="section-name-link" href="#/Custom%20Methods"></a>
                  <h3 class="section-name"><span>Custom Methods</span>
</h3>
                </div>
              </div>
              <ul class="item-container">
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:10ChatLayout014CollectionViewaB0C24getContentOffsetSnapshot4fromAA0ab8PositionH0VSgAG4EdgeO_tF"></a>
                    <a name="//apple_ref/swift/Method/getContentOffsetSnapshot(from:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:10ChatLayout014CollectionViewaB0C24getContentOffsetSnapshot4fromAA0ab8PositionH0VSgAG4EdgeO_tF">getContentOffsetSnapshot(from:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Get current offset of the item closest to the provided edge.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">@MainActor</span>
<span class="kd">open</span> <span class="kd">func</span> <span class="nf">getContentOffsetSnapshot</span><span class="p">(</span><span class="n">from</span> <span class="nv">edge</span><span class="p">:</span> <span class="kt"><a href="../Structs/ChatLayoutPositionSnapshot.html">ChatLayoutPositionSnapshot</a></span><span class="o">.</span><span class="kt">Edge</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt"><a href="../Structs/ChatLayoutPositionSnapshot.html">ChatLayoutPositionSnapshot</a></span><span class="p">?</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>edge</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>The edge of the <code>UICollectionView</code></p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                      <div>
                        <h4>Return Value</h4>
                        <p><code><a href="../Structs/ChatLayoutPositionSnapshot.html">ChatLayoutPositionSnapshot</a></code></p>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:10ChatLayout014CollectionViewaB0C20restoreContentOffset4withyAA0aB16PositionSnapshotV_tF"></a>
                    <a name="//apple_ref/swift/Method/restoreContentOffset(with:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:10ChatLayout014CollectionViewaB0C20restoreContentOffset4withyAA0aB16PositionSnapshotV_tF">restoreContentOffset(with:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Invalidates layout of the <code>UICollectionView</code> and trying to keep the offset of the item provided in <code><a href="../Structs/ChatLayoutPositionSnapshot.html">ChatLayoutPositionSnapshot</a></code></p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">@MainActor</span>
<span class="kd">open</span> <span class="kd">func</span> <span class="nf">restoreContentOffset</span><span class="p">(</span><span class="n">with</span> <span class="nv">snapshot</span><span class="p">:</span> <span class="kt"><a href="../Structs/ChatLayoutPositionSnapshot.html">ChatLayoutPositionSnapshot</a></span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>snapshot</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p><code><a href="../Structs/ChatLayoutPositionSnapshot.html">ChatLayoutPositionSnapshot</a></code></p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:10ChatLayout014CollectionViewaB0C16reconfigureItems2atySay10Foundation9IndexPathVG_tF"></a>
                    <a name="//apple_ref/swift/Method/reconfigureItems(at:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:10ChatLayout014CollectionViewaB0C16reconfigureItems2atySay10Foundation9IndexPathVG_tF">reconfigureItems(at:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>If you want to use new <code>UICollectionView.reconfigureItems(..)</code> api and expect the reconfiguration to happen animated as well</p>

<ul>
<li>you must call this method next to the <code>UICollectionView</code> one. <code>UIKit</code> in its classic way uses private API to process it.</li>
</ul>

<p>NB: Reconfigure items is not exposed to the layout, it may behave strange and if you experience something like
this - move to the <code>UICollectionView.reloadItems(..)</code> as a safer option.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">@MainActor</span>
<span class="kd">open</span> <span class="kd">func</span> <span class="nf">reconfigureItems</span><span class="p">(</span><span class="n">at</span> <span class="nv">indexPaths</span><span class="p">:</span> <span class="p">[</span><span class="kt">IndexPath</span><span class="p">])</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:10ChatLayout014CollectionViewaB0C23indexPathForItePinnedAty10Foundation05IndexF0VSgAA0A15ItemPinningTypeOF"></a>
                    <a name="//apple_ref/swift/Method/indexPathForItePinnedAt(_:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:10ChatLayout014CollectionViewaB0C23indexPathForItePinnedAty10Foundation05IndexF0VSgAA0A15ItemPinningTypeOF">indexPathForItePinnedAt(_:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Returns index path of currently pinned item.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">@MainActor</span>
<span class="kd">open</span> <span class="kd">func</span> <span class="nf">indexPathForItePinnedAt</span><span class="p">(</span><span class="n">_</span> <span class="nv">pinningType</span><span class="p">:</span> <span class="kt"><a href="../Enums/ChatItemPinningType.html">ChatItemPinningType</a></span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">IndexPath</span><span class="p">?</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
            <div class="task-group">
              <div class="task-name-container">
                <a name="/Providing%20Layout%20Attributes"></a>
                <a name="//apple_ref/swift/Section/Providing Layout Attributes" class="dashAnchor"></a>
                <div class="section-name-container">
                  <a class="section-name-link" href="#/Providing%20Layout%20Attributes"></a>
                  <h3 class="section-name"><span>Providing Layout Attributes</span>
</h3>
                </div>
              </div>
              <ul class="item-container">
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:@M@ChatLayout@objc(cs)CollectionViewChatLayout(im)prepareLayout"></a>
                    <a name="//apple_ref/swift/Method/prepare()" class="dashAnchor"></a>
                    <a class="token" href="#/c:@M@ChatLayout@objc(cs)CollectionViewChatLayout(im)prepareLayout">prepare()</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Tells the layout object to update the current layout.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">@MainActor</span>
<span class="kd">open</span> <span class="k">override</span> <span class="kd">func</span> <span class="nf">prepare</span><span class="p">()</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:@M@ChatLayout@objc(cs)CollectionViewChatLayout(im)layoutAttributesForElementsInRect:"></a>
                    <a name="//apple_ref/swift/Method/layoutAttributesForElements(in:)" class="dashAnchor"></a>
                    <a class="token" href="#/c:@M@ChatLayout@objc(cs)CollectionViewChatLayout(im)layoutAttributesForElementsInRect:">layoutAttributesForElements(in:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Retrieves the layout attributes for all of the cells and views in the specified rectangle.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">@MainActor</span>
<span class="kd">open</span> <span class="k">override</span> <span class="kd">func</span> <span class="nf">layoutAttributesForElements</span><span class="p">(</span><span class="k">in</span> <span class="nv">rect</span><span class="p">:</span> <span class="kt">CGRect</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="p">[</span><span class="kt">UICollectionViewLayoutAttributes</span><span class="p">]?</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:@M@ChatLayout@objc(cs)CollectionViewChatLayout(im)layoutAttributesForItemAtIndexPath:"></a>
                    <a name="//apple_ref/swift/Method/layoutAttributesForItem(at:)" class="dashAnchor"></a>
                    <a class="token" href="#/c:@M@ChatLayout@objc(cs)CollectionViewChatLayout(im)layoutAttributesForItemAtIndexPath:">layoutAttributesForItem(at:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Retrieves layout information for an item at the specified index path with a corresponding cell.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">@MainActor</span>
<span class="kd">open</span> <span class="k">override</span> <span class="kd">func</span> <span class="nf">layoutAttributesForItem</span><span class="p">(</span><span class="n">at</span> <span class="nv">indexPath</span><span class="p">:</span> <span class="kt">IndexPath</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">UICollectionViewLayoutAttributes</span><span class="p">?</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:@M@ChatLayout@objc(cs)CollectionViewChatLayout(im)layoutAttributesForSupplementaryViewOfKind:atIndexPath:"></a>
                    <a name="//apple_ref/swift/Method/layoutAttributesForSupplementaryView(ofKind:at:)" class="dashAnchor"></a>
                    <a class="token" href="#/c:@M@ChatLayout@objc(cs)CollectionViewChatLayout(im)layoutAttributesForSupplementaryViewOfKind:atIndexPath:">layoutAttributesForSupplementaryView(ofKind:<wbr>at:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Retrieves the layout attributes for the specified supplementary view.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">@MainActor</span>
<span class="kd">open</span> <span class="k">override</span> <span class="kd">func</span> <span class="nf">layoutAttributesForSupplementaryView</span><span class="p">(</span>
    <span class="n">ofKind</span> <span class="nv">elementKind</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span>
    <span class="n">at</span> <span class="nv">indexPath</span><span class="p">:</span> <span class="kt">IndexPath</span>
<span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">UICollectionViewLayoutAttributes</span><span class="p">?</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
            <div class="task-group">
              <div class="task-name-container">
                <a name="/Coordinating%20Animated%20Changes"></a>
                <a name="//apple_ref/swift/Section/Coordinating Animated Changes" class="dashAnchor"></a>
                <div class="section-name-container">
                  <a class="section-name-link" href="#/Coordinating%20Animated%20Changes"></a>
                  <h3 class="section-name"><span>Coordinating Animated Changes</span>
</h3>
                </div>
              </div>
              <ul class="item-container">
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:@M@ChatLayout@objc(cs)CollectionViewChatLayout(im)prepareForAnimatedBoundsChange:"></a>
                    <a name="//apple_ref/swift/Method/prepare(forAnimatedBoundsChange:)" class="dashAnchor"></a>
                    <a class="token" href="#/c:@M@ChatLayout@objc(cs)CollectionViewChatLayout(im)prepareForAnimatedBoundsChange:">prepare(forAnimatedBoundsChange:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Prepares the layout object for animated changes to the view’s bounds or the insertion or deletion of items.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">@MainActor</span>
<span class="kd">open</span> <span class="k">override</span> <span class="kd">func</span> <span class="nf">prepare</span><span class="p">(</span><span class="n">forAnimatedBoundsChange</span> <span class="nv">oldBounds</span><span class="p">:</span> <span class="kt">CGRect</span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:@M@ChatLayout@objc(cs)CollectionViewChatLayout(im)finalizeAnimatedBoundsChange"></a>
                    <a name="//apple_ref/swift/Method/finalizeAnimatedBoundsChange()" class="dashAnchor"></a>
                    <a class="token" href="#/c:@M@ChatLayout@objc(cs)CollectionViewChatLayout(im)finalizeAnimatedBoundsChange">finalizeAnimatedBoundsChange()</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Cleans up after any animated changes to the view’s bounds or after the insertion or deletion of items.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">@MainActor</span>
<span class="kd">open</span> <span class="k">override</span> <span class="kd">func</span> <span class="nf">finalizeAnimatedBoundsChange</span><span class="p">()</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
            <div class="task-group">
              <div class="task-name-container">
                <a name="/Context%20Invalidation"></a>
                <a name="//apple_ref/swift/Section/Context Invalidation" class="dashAnchor"></a>
                <div class="section-name-container">
                  <a class="section-name-link" href="#/Context%20Invalidation"></a>
                  <h3 class="section-name"><span>Context Invalidation</span>
</h3>
                </div>
              </div>
              <ul class="item-container">
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:@M@ChatLayout@objc(cs)CollectionViewChatLayout(im)shouldInvalidateLayoutForPreferredLayoutAttributes:withOriginalAttributes:"></a>
                    <a name="//apple_ref/swift/Method/shouldInvalidateLayout(forPreferredLayoutAttributes:withOriginalAttributes:)" class="dashAnchor"></a>
                    <a class="token" href="#/c:@M@ChatLayout@objc(cs)CollectionViewChatLayout(im)shouldInvalidateLayoutForPreferredLayoutAttributes:withOriginalAttributes:">shouldInvalidateLayout(forPreferredLayoutAttributes:<wbr>withOriginalAttributes:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Asks the layout object if changes to a self-sizing cell require a layout update.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">@MainActor</span>
<span class="kd">open</span> <span class="k">override</span> <span class="kd">func</span> <span class="nf">shouldInvalidateLayout</span><span class="p">(</span>
    <span class="n">forPreferredLayoutAttributes</span> <span class="nv">preferredAttributes</span><span class="p">:</span> <span class="kt">UICollectionViewLayoutAttributes</span><span class="p">,</span>
    <span class="n">withOriginalAttributes</span> <span class="nv">originalAttributes</span><span class="p">:</span> <span class="kt">UICollectionViewLayoutAttributes</span>
<span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Bool</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:@M@ChatLayout@objc(cs)CollectionViewChatLayout(im)invalidationContextForPreferredLayoutAttributes:withOriginalAttributes:"></a>
                    <a name="//apple_ref/swift/Method/invalidationContext(forPreferredLayoutAttributes:withOriginalAttributes:)" class="dashAnchor"></a>
                    <a class="token" href="#/c:@M@ChatLayout@objc(cs)CollectionViewChatLayout(im)invalidationContextForPreferredLayoutAttributes:withOriginalAttributes:">invalidationContext(forPreferredLayoutAttributes:<wbr>withOriginalAttributes:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Retrieves a context object that identifies the portions of the layout that should change in response to dynamic cell changes.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">@MainActor</span>
<span class="kd">open</span> <span class="k">override</span> <span class="kd">func</span> <span class="nf">invalidationContext</span><span class="p">(</span>
    <span class="n">forPreferredLayoutAttributes</span> <span class="nv">preferredAttributes</span><span class="p">:</span> <span class="kt">UICollectionViewLayoutAttributes</span><span class="p">,</span>
    <span class="n">withOriginalAttributes</span> <span class="nv">originalAttributes</span><span class="p">:</span> <span class="kt">UICollectionViewLayoutAttributes</span>
<span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">UICollectionViewLayoutInvalidationContext</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:@M@ChatLayout@objc(cs)CollectionViewChatLayout(im)shouldInvalidateLayoutForBoundsChange:"></a>
                    <a name="//apple_ref/swift/Method/shouldInvalidateLayout(forBoundsChange:)" class="dashAnchor"></a>
                    <a class="token" href="#/c:@M@ChatLayout@objc(cs)CollectionViewChatLayout(im)shouldInvalidateLayoutForBoundsChange:">shouldInvalidateLayout(forBoundsChange:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Asks the layout object if the new bounds require a layout update.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">@MainActor</span>
<span class="kd">open</span> <span class="k">override</span> <span class="kd">func</span> <span class="nf">shouldInvalidateLayout</span><span class="p">(</span><span class="n">forBoundsChange</span> <span class="nv">newBounds</span><span class="p">:</span> <span class="kt">CGRect</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Bool</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:@M@ChatLayout@objc(cs)CollectionViewChatLayout(im)invalidationContextForBoundsChange:"></a>
                    <a name="//apple_ref/swift/Method/invalidationContext(forBoundsChange:)" class="dashAnchor"></a>
                    <a class="token" href="#/c:@M@ChatLayout@objc(cs)CollectionViewChatLayout(im)invalidationContextForBoundsChange:">invalidationContext(forBoundsChange:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Retrieves a context object that defines the portions of the layout that should change when a bounds change occurs.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">@MainActor</span>
<span class="kd">open</span> <span class="k">override</span> <span class="kd">func</span> <span class="nf">invalidationContext</span><span class="p">(</span><span class="n">forBoundsChange</span> <span class="nv">newBounds</span><span class="p">:</span> <span class="kt">CGRect</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">UICollectionViewLayoutInvalidationContext</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:@M@ChatLayout@objc(cs)CollectionViewChatLayout(im)invalidateLayoutWithContext:"></a>
                    <a name="//apple_ref/swift/Method/invalidateLayout(with:)" class="dashAnchor"></a>
                    <a class="token" href="#/c:@M@ChatLayout@objc(cs)CollectionViewChatLayout(im)invalidateLayoutWithContext:">invalidateLayout(with:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Invalidates the current layout using the information in the provided context object.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">@MainActor</span>
<span class="kd">open</span> <span class="k">override</span> <span class="kd">func</span> <span class="nf">invalidateLayout</span><span class="p">(</span><span class="n">with</span> <span class="nv">context</span><span class="p">:</span> <span class="kt">UICollectionViewLayoutInvalidationContext</span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:@M@ChatLayout@objc(cs)CollectionViewChatLayout(im)invalidateLayout"></a>
                    <a name="//apple_ref/swift/Method/invalidateLayout()" class="dashAnchor"></a>
                    <a class="token" href="#/c:@M@ChatLayout@objc(cs)CollectionViewChatLayout(im)invalidateLayout">invalidateLayout()</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Invalidates the current layout and triggers a layout update.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">@MainActor</span>
<span class="kd">open</span> <span class="k">override</span> <span class="kd">func</span> <span class="nf">invalidateLayout</span><span class="p">()</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:@M@ChatLayout@objc(cs)CollectionViewChatLayout(im)targetContentOffsetForProposedContentOffset:"></a>
                    <a name="//apple_ref/swift/Method/targetContentOffset(forProposedContentOffset:)" class="dashAnchor"></a>
                    <a class="token" href="#/c:@M@ChatLayout@objc(cs)CollectionViewChatLayout(im)targetContentOffsetForProposedContentOffset:">targetContentOffset(forProposedContentOffset:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Retrieves the content offset to use after an animated layout update or change.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">@MainActor</span>
<span class="kd">open</span> <span class="k">override</span> <span class="kd">func</span> <span class="nf">targetContentOffset</span><span class="p">(</span><span class="n">forProposedContentOffset</span> <span class="nv">proposedContentOffset</span><span class="p">:</span> <span class="kt">CGPoint</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">CGPoint</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
            <div class="task-group">
              <div class="task-name-container">
                <a name="/Responding%20to%20Collection%20View%20Updates"></a>
                <a name="//apple_ref/swift/Section/Responding to Collection View Updates" class="dashAnchor"></a>
                <div class="section-name-container">
                  <a class="section-name-link" href="#/Responding%20to%20Collection%20View%20Updates"></a>
                  <h3 class="section-name"><span>Responding to Collection View Updates</span>
</h3>
                </div>
              </div>
              <ul class="item-container">
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:@M@ChatLayout@objc(cs)CollectionViewChatLayout(im)prepareForCollectionViewUpdates:"></a>
                    <a name="//apple_ref/swift/Method/prepare(forCollectionViewUpdates:)" class="dashAnchor"></a>
                    <a class="token" href="#/c:@M@ChatLayout@objc(cs)CollectionViewChatLayout(im)prepareForCollectionViewUpdates:">prepare(forCollectionViewUpdates:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Notifies the layout object that the contents of the collection view are about to change.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">@MainActor</span>
<span class="kd">open</span> <span class="k">override</span> <span class="kd">func</span> <span class="nf">prepare</span><span class="p">(</span><span class="n">forCollectionViewUpdates</span> <span class="nv">updateItems</span><span class="p">:</span> <span class="p">[</span><span class="kt">UICollectionViewUpdateItem</span><span class="p">])</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:@M@ChatLayout@objc(cs)CollectionViewChatLayout(im)finalizeCollectionViewUpdates"></a>
                    <a name="//apple_ref/swift/Method/finalizeCollectionViewUpdates()" class="dashAnchor"></a>
                    <a class="token" href="#/c:@M@ChatLayout@objc(cs)CollectionViewChatLayout(im)finalizeCollectionViewUpdates">finalizeCollectionViewUpdates()</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Performs any additional animations or clean up needed during a collection view update.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">@MainActor</span>
<span class="kd">open</span> <span class="k">override</span> <span class="kd">func</span> <span class="nf">finalizeCollectionViewUpdates</span><span class="p">()</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
            <div class="task-group">
              <div class="task-name-container">
                <a name="/Cell%20Appearance%20Animation"></a>
                <a name="//apple_ref/swift/Section/Cell Appearance Animation" class="dashAnchor"></a>
                <div class="section-name-container">
                  <a class="section-name-link" href="#/Cell%20Appearance%20Animation"></a>
                  <h3 class="section-name"><span>Cell Appearance Animation</span>
</h3>
                </div>
              </div>
              <ul class="item-container">
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:@M@ChatLayout@objc(cs)CollectionViewChatLayout(im)initialLayoutAttributesForAppearingItemAtIndexPath:"></a>
                    <a name="//apple_ref/swift/Method/initialLayoutAttributesForAppearingItem(at:)" class="dashAnchor"></a>
                    <a class="token" href="#/c:@M@ChatLayout@objc(cs)CollectionViewChatLayout(im)initialLayoutAttributesForAppearingItemAtIndexPath:">initialLayoutAttributesForAppearingItem(at:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Retrieves the starting layout information for an item being inserted into the collection view.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">@MainActor</span>
<span class="kd">open</span> <span class="k">override</span> <span class="kd">func</span> <span class="nf">initialLayoutAttributesForAppearingItem</span><span class="p">(</span><span class="n">at</span> <span class="nv">itemIndexPath</span><span class="p">:</span> <span class="kt">IndexPath</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">UICollectionViewLayoutAttributes</span><span class="p">?</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:@M@ChatLayout@objc(cs)CollectionViewChatLayout(im)finalLayoutAttributesForDisappearingItemAtIndexPath:"></a>
                    <a name="//apple_ref/swift/Method/finalLayoutAttributesForDisappearingItem(at:)" class="dashAnchor"></a>
                    <a class="token" href="#/c:@M@ChatLayout@objc(cs)CollectionViewChatLayout(im)finalLayoutAttributesForDisappearingItemAtIndexPath:">finalLayoutAttributesForDisappearingItem(at:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Retrieves the final layout information for an item that is about to be removed from the collection view.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">@MainActor</span>
<span class="kd">open</span> <span class="k">override</span> <span class="kd">func</span> <span class="nf">finalLayoutAttributesForDisappearingItem</span><span class="p">(</span><span class="n">at</span> <span class="nv">itemIndexPath</span><span class="p">:</span> <span class="kt">IndexPath</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">UICollectionViewLayoutAttributes</span><span class="p">?</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
            <div class="task-group">
              <div class="task-name-container">
                <a name="/Supplementary%20View%20Appearance%20Animation"></a>
                <a name="//apple_ref/swift/Section/Supplementary View Appearance Animation" class="dashAnchor"></a>
                <div class="section-name-container">
                  <a class="section-name-link" href="#/Supplementary%20View%20Appearance%20Animation"></a>
                  <h3 class="section-name"><span>Supplementary View Appearance Animation</span>
</h3>
                </div>
              </div>
              <ul class="item-container">
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:@M@ChatLayout@objc(cs)CollectionViewChatLayout(im)initialLayoutAttributesForAppearingSupplementaryElementOfKind:atIndexPath:"></a>
                    <a name="//apple_ref/swift/Method/initialLayoutAttributesForAppearingSupplementaryElement(ofKind:at:)" class="dashAnchor"></a>
                    <a class="token" href="#/c:@M@ChatLayout@objc(cs)CollectionViewChatLayout(im)initialLayoutAttributesForAppearingSupplementaryElementOfKind:atIndexPath:">initialLayoutAttributesForAppearingSupplementaryElement(ofKind:<wbr>at:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Retrieves the starting layout information for a supplementary view being inserted into the collection view.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">@MainActor</span>
<span class="kd">open</span> <span class="k">override</span> <span class="kd">func</span> <span class="nf">initialLayoutAttributesForAppearingSupplementaryElement</span><span class="p">(</span>
    <span class="n">ofKind</span> <span class="nv">elementKind</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span>
    <span class="n">at</span> <span class="nv">elementIndexPath</span><span class="p">:</span> <span class="kt">IndexPath</span>
<span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">UICollectionViewLayoutAttributes</span><span class="p">?</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:@M@ChatLayout@objc(cs)CollectionViewChatLayout(im)finalLayoutAttributesForDisappearingSupplementaryElementOfKind:atIndexPath:"></a>
                    <a name="//apple_ref/swift/Method/finalLayoutAttributesForDisappearingSupplementaryElement(ofKind:at:)" class="dashAnchor"></a>
                    <a class="token" href="#/c:@M@ChatLayout@objc(cs)CollectionViewChatLayout(im)finalLayoutAttributesForDisappearingSupplementaryElementOfKind:atIndexPath:">finalLayoutAttributesForDisappearingSupplementaryElement(ofKind:<wbr>at:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Retrieves the final layout information for a supplementary view that is about to be removed from the collection view.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">@MainActor</span>
<span class="kd">open</span> <span class="k">override</span> <span class="kd">func</span> <span class="nf">finalLayoutAttributesForDisappearingSupplementaryElement</span><span class="p">(</span>
    <span class="n">ofKind</span> <span class="nv">elementKind</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span>
    <span class="n">at</span> <span class="nv">elementIndexPath</span><span class="p">:</span> <span class="kt">IndexPath</span>
<span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">UICollectionViewLayoutAttributes</span><span class="p">?</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
          </div>
        </section>

      </article>
    </div>
    <section class="footer">
      <p>&copy; 2025 <a class="link" href="https://github.com/ekazaev" target="_blank" rel="external noopener">Evgeny Kazaev</a>. All rights reserved. (Last updated: 2025-07-30)</p>
      <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.15.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
    </section>
  </body>
</html>
